/**
 * A simple print job
 * @author Matt Dye
 *
 */
public class SimplePrintJob implements Comparable<SimplePrintJob>
{
	private String name;
	private int pages;
	public SimplePrintJob(String name, int pages)
	{
		this.name = name;
		this.pages = pages;
	}
	/**
	 * Compares two jobs by page numbers
	 */
	@Override
	public int compareTo(SimplePrintJob o) {
		if(this.getPages() < o.getPages())
			return -1;
		else if(this.getPages() > o.getPages())
			return 1;
		else 
			return 0;
	}
	
	@Override
	public String toString()
	{
		return "Name: " + this.getName() + " Pages: " +  this.getPages() + " pages";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getPages() {
		return pages;
	}

	public void setPages(int pages) {
		this.pages = pages;
	}
}





